import { Component } from "@xuekl/cli-core/enums"
import * as c from "@xuekl/cli-core/components"
import { BaseForm } from "@xuekl/cli-core/builder"

export default class Dict extends BaseForm {
    dictId = ''
    dictName = ''
    dictType = ''
    status = '0'
    remark = ''

    clear(): void {
        this.setForm(new Dict(this.opts))
        this.resetFields()
    }

    getDictName(): c.Input {
        return {
            type: Component.Input,
            label: '字典名称',
            mode: ['query'],
            required: true,
            element: {
            }
        }
    }

    getDictType(): c.Input {
        return {
            type: Component.Input,
            label: '字典类型',
            mode: ['query'],
            required: true,
            element: {
            }
        }
    }

    getStatus(): c.Radio {
        return {
            type: Component.Radio,
            label: '状态',
            config: {
                dict: 'sys_normal_disable'
            }
        }
    }

    getRemark(): c.Textarea {
        return {
            type: Component.Textarea,
            label: '备注',
        }
    }
}
